
package codeGenerate.powerdesigner.converter.impl;

import java.util.ArrayList;
import java.util.List;

import codeGenerate.common.utils.SystemUtils;
import codeGenerate.powerdesigner.converter.PowerdesignerConverter;
import codeGenerate.powerdesigner.entry.PowerdesignerTableColumnVo;

/**
 * 默认列名原始名称转换器
 */
public class DefaultPowerdesignerConverter implements PowerdesignerConverter {

	private static final List<String> targetNameFilterRegexList = new ArrayList<String>();

	static {
		targetNameFilterRegexList.add("[\\n`~!@#$%^&*()+=|{}':;',\\\\[\\\\].<>/?~！@#￥%……&*（）——+|{}【】‘；：”“’。， 、？＞≥]");
	}

	@Override
	public PowerdesignerTableColumnVo convert(String orginName) {
		PowerdesignerTableColumnVo tableColumn = new PowerdesignerTableColumnVo();
		tableColumn.setOrignName(orginName);
		tableColumn.setComment(orginName);
		tableColumn.setCode(SystemUtils.chineseToDbColumnCode(orginName));
		return tableColumn;
	}

}
